# coding=utf-8
import threading
import time


class MyThread(threading.Thread):
	def __init__(self, id):
		threading.Thread.__init__(self)

	def run(self):
		time.sleep(5)
		print "This is " + self.getName()


class Car(threading.Thread):
	def __init__(self, id):
		threading.Thread.__init__(self, name=id)

	def run(self):
		print '%s is runnning' % (self.getName())


def hello():
	time.sleep(3)
	print 'say hello %s' % (threading.currentThread().name)


def test_thread():
	for i in range(25):
		threading.Thread(target=hello).start()


if __name__ == "__main__":
	c1 = Car(100)
	c2 = Car(200)
	c1.start()
	c2.start()
	##c1.join()
	##c2.join()
	print '>>>>>>>>>>>>>>>>>>' + threading.currentThread().name
	test_thread()
